#ifndef AGGAUX_H_
#define AGGAUX_H_

#include <vector>
#include "includes.h"
#include "heapplus.h"

// Compare function for the priorities
struct CompareFMDB {
  bool operator()(pEntity n1, pEntity n2) {
    int p1(0), p2(0);

    EN_getDataInt(n1, MD_lookupMeshDataId("priority"), &p1);
    EN_getDataInt(n2, MD_lookupMeshDataId("priority"), &p2);

    return (p1 < p2);
  }
};

// Sort nodes according to priority
vector<pEntity> sortSeedNodes(pMesh);

#endif /*AGGAUX_H_*/


